<!--劳动能力鉴定现场申请 -->
<template>
    <el-main>
        <el-main class="ep-body">

            <epl-top-bar :datas="{formData:form,panel: panel}"  showPerson personType="PERSON_ALL_EXACT" psTagType="PERSON_INJURY_QUERY"
                          >
                <ep-saveButton id="doSave" type="primary"
                               :datas="{formData: form,panel: panel}" name="保存"></ep-saveButton>
                <ep-button size="small" name="刷新"></ep-button>

            </epl-top-bar>
            <epl-userMessage dataType="person" idCount="5" >

            </epl-userMessage>

            <el-card class="ep-card" >

                <el-form :model="form"  :rules="rules"  >
                    <!--<ep-title>人员信息</ep-title>-->
                            <!--<el-row :gutter="10">-->
                                <!--<ep-input  label="人员编号" name="lc61aac001" :property="form.lc61aac001"-->
                                           <!--p="H"  :datas="{formData: form}"></ep-input>-->
                                <!--<ep-input colspan="8" label="姓名" name="lc61aac003"  :property="form.lc61aac003"-->
                                           <!--p="R"  :datas="{formData: form}"></ep-input>-->
                                <!--<ep-input colspan="4" label="年龄" name="lc61nl" :property="form.lc61nl"-->
                                           <!--p="E"  :datas="{formData: form}"></ep-input>-->
                                <!--<ep-select colspan="4" label="性别" name="lc61aac004" :property="form.lc61aac004" placeholder="请输入性别"-->
                                           <!--p="E" :datas="{formData: form}" codetype="AAC004" ></ep-select>-->
                                <!--<ep-select colspan="8" label="民族" name="lc61aac005" :property=" form.lc61aac005" placeholder="请输入民族"-->
                                           <!--p="E" :datas="{formData: form}" codetype="AAC005"  ></ep-select>-->
                            <!--</el-row>-->
                            <!--<el-row :gutter="10">-->

                                <!--<ep-input colspan="8" label="身份证号码" name="lc61aac147" :property="form.lc61aac147" placeholder="请输入身份证号码"-->
                                          <!--p="R"  :datas="{formData: form}"  ></ep-input>-->
                                <!--<ep-input colspan="8" label="手机号码" name="lc61aac067" :property="form.lc61aac067" placeholder="请输入手机号码"-->
                                           <!--p="E" :datas="{formData: form}"></ep-input>-->
                                <!--<ep-input colspan="8" label="联系电话" name="lc61aae005" :property="form.lc61aae005" placeholder="请输入联系电话"-->
                                          <!--p="E" :datas="{formData: form}"></ep-input>-->
                            <!--</el-row>-->
                            <!--<el-row :gutter="10">-->
                                <!--<ep-input colspan="16" label="邮寄地址" name="lc61aae006" :property="form.lc61aae006" placeholder="请输入邮寄地址"-->
                                          <!--p="R" :datas="{formData: form}"></ep-input>-->
                                <!--<ep-input colspan="8" label="邮政编码" name="lc61aae007" :property="form.lc61aae007" placeholder="请输入邮政编码"-->
                                          <!--p="E" :datas="{formData: form}"></ep-input>-->
                            <!--</el-row>-->
                            <!--<el-row :gutter="10">-->
                                <!--<ep-select colspan="8" label="参保地" name="lc61aaa027" :property="form.lc61aaa027"-->
                                             <!--p="R"   :datas="{formData: form}" codetype="AAA027" ></ep-select>-->
                                <!--<ep-select colspan="8" label="离退休状态" name="lc61aac084" :property="form.lc61aac084"  placeholder="请输入离退休状态"-->
                                           <!--p="E"   :datas="{formData: form}" codetype="AAC084" ></ep-select>-->
                                <!--<ep-select colspan="8" label="参保状态" name="lc61aac008" :property="form.lc61aac008"-->
                                           <!--p="E"  :datas="{formData: form}" codetype="AAC008"></ep-select>-->
                            <!--</el-row>-->


                    <ep-title>请输入单位信息</ep-title>


                            <el-row :gutter="10">
                                <ep-input colspan="16" label="单位id" name="aab001" :property="form.aab001"
                                          p="D" :datas="{formData: form}"></ep-input>
                                <ep-input colspan="16" label="单位名称" name="aab069" :property="form.aab069" placeholder="请输入单位名称"
                                           p="R" :datas="{formData: form}"></ep-input>
                            </el-row>
                            <el-row :gutter="10">
                                <ep-input colspan="8" label="统一社会信用代码" name="bab010"  :property="form.bab010" placeholder="请输入统一社会信用代码"
                                          p="E"  :datas="{formData: form}" isChange ></ep-input>
                                <ep-input colspan="8" label="联系人" name="aae004" :property="form.aae004"  placeholder="请输入联系人"
                                          p="E" :datas="{formData: form}"></ep-input>

                                <ep-input colspan="8" label="法人代表" name="aab013" :property="form.aab013" placeholder="请输入法人代表"
                                          p="E" :datas="{formData :form}"></ep-input>
                            </el-row>
                            <el-row :gutter="10">
                                <ep-input colspan="8" label="联系电话" name="aae005" :property="form.aae005" placeholder="请输入联系电话"
                                          p="E" :datas="{formData :form}"></ep-input>
                                <ep-input colspan="8" label="手机号码" name="aac067" rules="this.$rules.mobile" :property="form.aac067" placeholder="请输入手机号码"
                                          p="E" :datas="{formData :form}"></ep-input>
                                <ep-select colspan="8" label="参保状态" name="aab051" :property="form.aab051"
                                           p="E"  :datas="{formData :form}" codetype="AAB051"></ep-select>

                            </el-row>
                            <el-row :gutter="10">
                                <ep-input colspan="16" label="地址" name="aae006" :property="form.aae006" placeholder="请输入地址"
                                          p="R" :datas="{formData: form}"></ep-input>
                                <ep-input colspan="8" label="邮编" name="aae007" :property="form.aae007" placeholder="请输入邮编"
                                          p="E" :datas="{formData: form}" rules="this.$rules.postcode"></ep-input>
                            </el-row>

                    <ep-title>请输入申请主体信息</ep-title>



                            <el-row :gutter="10">
                                <ep-select colspan="8" label="申请主体"  name="alc009" :property="form.alc009" placeholder="请选择申请主体" isChange
                                           p="R"  :datas="{formData: form}"  codetype="ALC009"></ep-select>
                                <ep-input colspan="8" label="申请人姓名" name="aac042" :property="form.aac042" placeholder="请输入申请人姓名"
                                          p="R" :datas="{formData: form}"></ep-input>
                                <ep-input colspan="8" label="申请人联系电话"  name="alc049"  :property="form.alc049" placeholder="请输入申请人联系电话"
                                          p="R" :datas="{formData: form}" rules="this.$rules.mobile"></ep-input>
                            </el-row>
                            <el-row :gutter="10">
                                <ep-select colspan="8" label="申请人证件类型"  name="aac043" :property="form.aac043" placeholder="请选择申请人证件类型"
                                            p="R" :datas="{formData: form}" codetype="AAC058"></ep-select>
                                <ep-input colspan="8" label="身份证号码" name="aac044" :property="form.aac044"  placeholder="请输入身份证号码"
                                          p="R" :datas="{formData: form}"  isChange  rules="this.$rules.isIDCard" ></ep-input>
                                <ep-date colspan="8" label="申请日期" name="aae127" :property="form.aae127" placeholder="请输入申请日期"
                                         p="H" :datas="{formData :form}" format="yyyyMMdd" value-format="yyyyMMdd" ></ep-date>
                            </el-row>
                            <el-row :gutter="10">
                                <ep-input colspan="8" label="申报号" name="bae506" :property="form.bae506"
                                          p="H" :datas="{formData: form}"></ep-input>
                            </el-row>

                    <ep-title>请输入劳动能力鉴定申请信息</ep-title>

                            <!--因工信息-->
                            <el-row :gutter="10">
                                <ep-select colspan="8" label="鉴定事项" name="bae508" :property="form.bae508" codetype="BAE508" isChange
                                           p="D"  :datas="{formData: form}"></ep-select>
                                <ep-select colspan="8" label="鉴定类别" name="ala019" :property="form.ala019" codetype="ALA019" isChange
                                           p="R"  :datas="{formData: form}"></ep-select>
                            </el-row>

                            <el-row :gutter="10">
                                <ep-input colspan="8" label="工伤认定书编号" name="alc011" :property="form.alc011"  placeholder="请输入工伤认定书编号"
                                          p="R"   :datas="{formData: form}" isChange ></ep-input>
                                <ep-date colspan="8" label="伤病日期" name="alc020" :property="form.alc020"  placeholder="请输入伤病日期" isChange format="yyyyMMdd" value-format="yyyyMMdd"
                                         p="R"  :datas="{formData: form}"></ep-date>
                                <ep-input  label="工伤认id" name="aaz127" :property="form.aaz127"
                                           p="H"   :datas="{formData: form}"></ep-input>
                            </el-row>

                            <el-row :gutter="10">
                                <ep-select colspan="24" label="受伤部位" name="alc022" :property="form.alc022"  placeholder="请选择受伤部位"
                                           p="R" :datas="{formData: form}"  codetype="ALC022"  ></ep-select>
                            </el-row>

                            <el-row :gutter="10">
                                <ep-textarea colspan="24" label="受伤情况" name="alc006" :property="form.alc006"  placeholder="请输入受伤情况" p="R"
                                             :datas="{formData: form}"></ep-textarea>
                            </el-row>
                            <!--供养亲属-->
                            <el-row :gutter="10">
                                <ep-input colspan="8" label="工亡职工姓名" name="aac003" :property="form.aac003"
                                          placeholder="请输入工亡职工姓名" p="H"  :datas="{formData: form}"></ep-input>
                                <ep-input colspan="8" label="身份证号" name="aac002" :property="form.aac002"  isChange
                                          placeholder="请输入身份证号" p="H" :datas="{formData: form}"></ep-input>
                                <ep-date colspan="8" label="死亡日期（失踪日期）" name="alc040" :property="form.alc040"
                                         placeholder="请输入死亡日期（失踪日期）" p="H"  :datas="{formData: form}" format="yyyyMMdd" value-format="yyyyMMdd" ></ep-date>
                            </el-row>

                            <el-row :gutter="10">
                                <ep-select colspan="8" label="与工亡职工关系" name="aae144" :property="form.aae144" placeholder="请输入工亡职工姓名"
                                           p="H"     :datas="{formData: form}" codetype="AAE144" > </ep-select>
                                <ep-input  label="工亡职工编号" name="bac500" :property="form.bac500"
                                           p="H" :datas="{formData: form}"></ep-input>
                            </el-row>

                            <el-row :gutter="10">
                                <ep-textarea colspan="24" label="医院疾病诊断" name="blc546" :property="form.blc546"
                                             placeholder="请输入医院疾病诊断" p="H"
                                             :datas="{formData: form}"></ep-textarea>
                            </el-row>

                            <el-row :gutter="10">
                                <ep-textarea colspan="24" label="目前丧失劳动能力情况" name="blc511" :property="form.blc511"
                                             placeholder="请输入目前丧失劳动能力情况" p="H"
                                             :datas="{formData: form}"></ep-textarea>
                            </el-row>

                            <!--辅助器具-->
                            <el-row :gutter="10">
                                <ep-select colspan="16" label="申请配置项目" name="alc056" :property="form.alc056"  placeholder="请选择申请配置项目"
                                           p="H"    :datas="{formData: form}" codetype="ALC056"></ep-select>
                            </el-row>
                            <!--老工伤护理依赖等级-->
                            <el-row :gutter="10">
                                <ep-select colspan="8" label="是否退休" name="aac084" :property="form.aac084"  placeholder="请选择是否退休"
                                           p="H" :datas="{formData: form}" codetype="AAC084" > </ep-select>
                                <ep-select colspan="8" label="工伤部位" name="blc510" :property="form.blc510" laceholder="请选择工伤部位"
                                           p="H"   :datas="{formData: form}" codetype="ALC022"></ep-select>
                                <ep-select colspan="8" label="工伤等级" name="blc529" :property="form.blc529" placeholder="请选择工伤等级"
                                           p="H"    datas="{form: form}" codetype="BLC529" ></ep-select>
                            </el-row>
                            <!--非因工信息-->
                            <el-row :gutter="10">
                                <ep-date colspan="8" label="参加工作时间" name="aac007" :property="form.aac007" placeholder="请输入参加工作时间"
                                         p="H" :datas="{formData: form}" format="yyyyMMdd" value-format="yyyyMMdd" ></ep-date>
                                <ep-select colspan="8" label="伤病名称" name="blc548" :property="form.blc548" placeholder="请选择伤病名称"
                                            p="H"    :datas="{formData: form}" codetype="ALC022"></ep-select>

                            </el-row>

                            <el-row :gutter="10">
                                <ep-textarea colspan="24" label="病情概述及治疗经过" name="blc547" :property="form.blc547"  placeholder="请输入病情概述及治疗经过"
                                             p="H" :datas="{formData: form}"></ep-textarea>
                            </el-row>
                            <!--复查或者再次鉴定信息-->
                            <el-row :gutter="10">
                                <ep-input colspan="8" label="鉴定结论书编号" name="alc045" :property="form.alc045" placeholder="请输入鉴定结论书编号"
                                          p="H"     :datas="{formData: form}" isChange></ep-input>
                                <ep-date colspan="8" label="鉴定时间" name="alc034" :property="form.alc034" placeholder="请输入鉴定时间" isChange
                                         p="H" :datas="{formData: form}" format="yyyyMMdd" value-format="yyyyMMdd" ></ep-date>
                                <ep-date colspan="8" label="送达时间" name="bae544" :property="form.bae544" placeholder="请输入送达时间" isChange
                                         p="H" :datas="{formData: form}" format="yyyyMMdd" value-format="yyyyMMdd" ></ep-date>
                                <ep-input  label="上次劳动能力鉴定ID" name="aaz151" :property="form.aaz151"
                                           p="H"   :datas="{formData: form}"></ep-input>
                            </el-row>

                            <el-row :gutter="10">
                                <ep-select colspan="8" label="伤残等级" name="ala040" :property="form.ala040" placeholder="请选择伤残等级"
                                           p="H"    :datas="{formData: form}" codetype="ALA040"></ep-select>
                                <ep-select colspan="8" label="护理依赖" name="alc060" :property="form.alc060"  placeholder="请选择护理依赖"
                                           p="H" :datas="{formData: form}"  codetype="ALC060"></ep-select>
                            </el-row>



                    <el-row type="flex" justify="center" >
                        <ep-saveButton id="doSave" top="20" type="primary" bottom="20" ref="save"  @formValidate="formValidate"
                                       :validate="['form']"   :datas="{formData: form,panel:panel}" name="保存"></ep-saveButton>
                        <ep-Button id="" top="20" type="primary" bottom="20"
                                       name="清空"></ep-Button>
                    </el-row>
                </el-form>
            </el-card>
        </el-main>

    </el-main>

</template>
<script type="es6">
    export default {
        data() {
            return {
                form:{
                    aab001: {
                        value: '',
                        p: 'D'
                    },
                    aab069: {
                        value: '',
                        p: 'R'
                    },
                    bab010: {
                        value: '',
                        p: 'E'
                    },
                    aae004: {
                        value: '',
                        p: 'E'
                    },
                    aab013: {
                        value: '',
                        p: 'E'
                    },
                    aae005: {
                        value: '',
                        p: 'E'
                    },
                    aac067: {
                        value: '',
                        p: 'E'
                    },
                    aab051: {
                        key: '',
                        value: '',
                        p: 'E'
                    },
                    aae006: {
                        value: '',
                        p: 'R'
                    },
                    aae007: {
                        value: '',
                        p: 'E'
                    },
                    alc009: {
                        key: '',
                        value: '',
                        p: 'R'
                    },
                    aac042: {
                        value: '',
                        p: 'R'
                    },
                    alc049: {
                        value: '',
                        p: 'R'
                    },
                    aac043: {
                        key: '',
                        value: '',
                        p: 'R'
                    },
                    aac044: {
                        value: '',
                        p: 'R'
                    },
                    aae127: {
                        value: '',
                        p: 'H'
                    },
                    bae506: {
                        value: '',
                        p: 'H'
                    },
                    bae508: {
                        key: '',
                        value: '',
                        p: 'D'
                    },
                    ala019: {
                        key: '',
                        value: '',
                        p: 'R'
                    },
                    alc011: {
                        value: '',
                        p: 'R'
                    },
                    alc020: {
                        value: '',
                        p: 'R'
                    },
                    aaz127: {
                        value: '',
                        p: 'H'
                    },
                    alc022: {
                        key: '',
                        value: '',
                        p: 'R'
                    },
                    alc006: {
                        value: '',
                        p: 'R'
                    },
                    aac003: {
                        value: '',
                        p: 'H'
                    },
                    aac002: {
                        value: '',
                        p: 'H'
                    },
                    alc040: {
                        value: '',
                        p: 'H'
                    },
                    aae144: {
                        key: '',
                        value: '',
                        p: 'H'
                    },
                    bac500: {
                        value: '',
                        p: 'H'
                    },
                    blc546: {
                        value: '',
                        p: 'H'
                    },
                    blc511: {
                        value: '',
                        p: 'H'
                    },
                    alc056: {
                        key: '',
                        value: '',
                        p: 'H'
                    },
                    aac084: {
                        key: '',
                        value: '',
                        p: 'H'
                    },
                    blc510: {
                        key: '',
                        value: '',
                        p: 'H'
                    },
                    blc529: {
                        key: '',
                        value: '',
                        p: 'H'
                    },
                    aac007: {
                        value: '',
                        p: 'H'
                    },
                    blc548: {
                        key: '',
                        value: '',
                        p: 'H'
                    },
                    blc547: {
                        value: '',
                        p: 'H'
                    },
                    alc045: {
                        value: '',
                        p: 'H'
                    },
                    alc034: {
                        value: '',
                        p: 'H'
                    },
                    bae544: {
                        value: '',
                        p: 'H'
                    },
                    aaz151: {
                        value: '',
                        p: 'H'
                    },
                    ala040: {
                        key: '',
                        value: '',
                        p: 'H'
                    },
                    alc060: {
                        key: '',
                        value: '',
                        p: 'H'
                    },

                },
                panel: {},
                panel: {},

                rules:{
                    aab069: [
                        {required: true, message: '必填项，不能为空'}

                    ],
                    aac067: [
                        { validator: this.$rules.mobile, trigger: 'blur'}

                    ],
                    aae006: [
                        {required: true, message: '必填项，不能为空'}

                    ],
                    aae007: [
                        { validator: this.$rules.postcode, trigger: 'blur'}

                    ],
                    alc009: [
                        {required: true, message: '必填项，不能为空'}

                    ],
                    aac042: [
                        {required: true, message: '必填项，不能为空'}

                    ],
                    alc049: [
                        {required: true, validator: this.$rules.mobile, trigger: 'blur'}

                    ],
                    aac043: [
                        {required: true, message: '必填项，不能为空'}

                    ],
                    aac044: [
                        {required: true, validator: this.$rules.isIDCard, trigger: 'blur'}

                    ],
                    ala019: [
                        {required: true, message: '必填项，不能为空'}

                    ],
                    alc011: [
                        {required: true, message: '必填项，不能为空'}

                    ],
                    alc020: [
                        {required: true, message: '必填项，不能为空'}

                    ],
                    alc022: [
                        {required: true, message: '必填项，不能为空'}

                    ],
                    alc006: [
                        {required: true, message: '必填项，不能为空'}

                    ],

                },
                codeTypes:{
                    AAB051:[],
                    ALC009:[],
                    AAC058:[],
                    BAE508:[],
                    ALA019:[],
                    ALC022:[],
                    AAE144:[],
                    ALC056:[],
                    AAC084:[],
                    BLC529:[],
                    ALA040:[],
                    ALC060:[],

                },
                codeTypeFilters:{

                },
                pager: {
                    page: 1,
                    size: 10
                },
                total: 0,
            }
        },
        computed: {
            functionId() {
                if (this.$store.getters.init.path !== this.$route.path) return;
                if (this.$store.getters.init.mdParam === null || this.$store.getters.init.mdParam === undefined) return;
                if (this.$store.getters.init.mdParam.functionid === undefined) return;
                return this.$store.getters.init.mdParam.functionid;
            },
            backFun() {
                return this.$store.getters.backFun;
            },
            init_formData() {
                if (this.$store.getters.init.path !== this.$route.path)  return;
                return this.$store.getters.init.form;
            },
            doInitformData: {
                get: function () {
                    if (this.$store.getters.common === null) return [];
                    if (this.$store.getters.common.path !== this.$route.path) return;
                    return this.$store.getters.common.formData;
                },
                set: function (newValue) {
                    if (newValue.path !== this.$route.path) return;
                    return newValue;
                }
            },
            init_panel() {
                if (this.$store.getters.init.path !== this.$route.path)  return;
                return this.$store.getters.init.panel;
            },
            doInitpanel: {
                get: function () {
                    if (this.$store.getters.common === null) return [];
                    if (this.$store.getters.common.path !== this.$route.path) return;
                    return this.$store.getters.common.panel;
                },
                set: function (newValue) {
                    if (newValue.path !== this.$route.path) return;
                    return newValue;
                }
            },

        },
        created() {
            let param = {
                path: this.$route.path,
                codeTypes:this.codeTypes,
                codeTypeFilters: window.btoa(JSON.stringify(this.codeTypeFilters)),
                form:this.form,
                panel:this. panel,
                panel:this.panel

            };
            if (this.$route.query.keepAlive === undefined) {
                this.$store.dispatch('SET_INIT', param);
            }
        },
        watch: {
            init_formData: {
                handler(value) {
                    if (value == undefined) return;
                    this.getformData(value);
                },
                deep: true
            },
            doInitformData: {
                handler(value) {
                    if (value == undefined) return;
                    this.getformData(value);
                },
                deep: true
            },
            init_panel: {
                handler(value) {
                    if (value == undefined) return;
                    this.getpanel(value);
                },
                deep: true
            },
            doInitpanel: {
                handler(value) {
                    if (value == undefined) return;
                    this.getpanel(value);
                },
                deep: true
            },

            backFun: {
                handler(value) {
                    if (value === null) return;
                    this.customBackFun();
                    let backFun = [];
                    backFun = value.split(',');
                    if (backFun.indexOf('rDoInit') >= 0) {
                        let codeTypes = {
                            AAB051:[],
                            ALC009:[],
                            AAC058:[],
                            BAE508:[],
                            ALA019:[],
                            ALC022:[],
                            AAE144:[],
                            ALC056:[],
                            AAC084:[],
                            BLC529:[],
                            ALA040:[],
                            ALC060:[],

                        };
                        let form = {
                            aab001: {
                                value: '',
                                p: 'D'
                            },
                            aab069: {
                                value: '',
                                p: 'R'
                            },
                            bab010: {
                                value: '',
                                p: 'E'
                            },
                            aae004: {
                                value: '',
                                p: 'E'
                            },
                            aab013: {
                                value: '',
                                p: 'E'
                            },
                            aae005: {
                                value: '',
                                p: 'E'
                            },
                            aac067: {
                                value: '',
                                p: 'E'
                            },
                            aab051: {
                                key: '',
                                value: '',
                                p: 'E'
                            },
                            aae006: {
                                value: '',
                                p: 'R'
                            },
                            aae007: {
                                value: '',
                                p: 'E'
                            },
                            alc009: {
                                key: '',
                                value: '',
                                p: 'R'
                            },
                            aac042: {
                                value: '',
                                p: 'R'
                            },
                            alc049: {
                                value: '',
                                p: 'R'
                            },
                            aac043: {
                                key: '',
                                value: '',
                                p: 'R'
                            },
                            aac044: {
                                value: '',
                                p: 'R'
                            },
                            aae127: {
                                value: '',
                                p: 'H'
                            },
                            bae506: {
                                value: '',
                                p: 'H'
                            },
                            bae508: {
                                key: '',
                                value: '',
                                p: 'D'
                            },
                            ala019: {
                                key: '',
                                value: '',
                                p: 'R'
                            },
                            alc011: {
                                value: '',
                                p: 'R'
                            },
                            alc020: {
                                value: '',
                                p: 'R'
                            },
                            aaz127: {
                                value: '',
                                p: 'H'
                            },
                            alc022: {
                                key: '',
                                value: '',
                                p: 'R'
                            },
                            alc006: {
                                value: '',
                                p: 'R'
                            },
                            aac003: {
                                value: '',
                                p: 'H'
                            },
                            aac002: {
                                value: '',
                                p: 'H'
                            },
                            alc040: {
                                value: '',
                                p: 'H'
                            },
                            aae144: {
                                key: '',
                                value: '',
                                p: 'H'
                            },
                            bac500: {
                                value: '',
                                p: 'H'
                            },
                            blc546: {
                                value: '',
                                p: 'H'
                            },
                            blc511: {
                                value: '',
                                p: 'H'
                            },
                            alc056: {
                                key: '',
                                value: '',
                                p: 'H'
                            },
                            aac084: {
                                key: '',
                                value: '',
                                p: 'H'
                            },
                            blc510: {
                                key: '',
                                value: '',
                                p: 'H'
                            },
                            blc529: {
                                key: '',
                                value: '',
                                p: 'H'
                            },
                            aac007: {
                                value: '',
                                p: 'H'
                            },
                            blc548: {
                                key: '',
                                value: '',
                                p: 'H'
                            },
                            blc547: {
                                value: '',
                                p: 'H'
                            },
                            alc045: {
                                value: '',
                                p: 'H'
                            },
                            alc034: {
                                value: '',
                                p: 'H'
                            },
                            bae544: {
                                value: '',
                                p: 'H'
                            },
                            aaz151: {
                                value: '',
                                p: 'H'
                            },
                            ala040: {
                                key: '',
                                value: '',
                                p: 'H'
                            },
                            alc060: {
                                key: '',
                                value: '',
                                p: 'H'
                            },

                        };
                        let  panel= {};


                        let param = {
                            path: this.$route.path,
                            codeTypes:codeTypes,
                            codeTypeFilters: window.btoa(JSON.stringify(this.codeTypeFilters)),
                            form:form,
                            panel: panel

                        };
                        this.$store.dispatch('SET_INIT', param);
                    }
                }
            }
        },
        mounted() {
            if (this.$store.getters.cacheData === null) return;
            if (this.$store.getters.cacheData[this.$route.path] === undefined)  return;
            if (this.$store.getters.cacheData[this.$route.path].path !== this.$route.path) return;
            if (this.$store.getters.cacheData[this.$route.path].form !== undefined) {
                this.form(this.$store.getters.cacheData[this.$route.path].form);
            }
            if (this.$store.getters.cacheData[this.$route.path].panel !== undefined) {
                this.panel(this.$store.getters.cacheData[this.$route.path].panel);
            }

        },
        beforeRouteLeave(to, from, next) {
            let param = {
                path: this.$route.path,
                codeTypes: this.$store.getters.codeTypes,
                codeTypeFilters: window.btoa(JSON.stringify(this.codeTypeFilters)),
                form:form,
                panel: panel

            };
            if (from) {
                this.$store.dispatch('SET_CACHEDATA', param);
            }
            next();
        },
        methods: {
            getformData(value) {
                this.form = value;
            },
            getpanel(value) {
                this.panel = value;
            },


            handleSizeChange(val) {
                console.log(`每页 ${val} 条`);
            },
            handleCurrentChange(val) {
                console.log(`当前页: ${val}`);
            },
            handleEdit(id) {
                this.dialogFormVisible = true;
            },
            formValidate(value){
                if(value && value.length>0){
                    let btn = true;
                    value.forEach((item,index)=>{
                        if(!btn) return
                        this.$refs[item].validate((valid) => {
                            if (valid) {
                                btn = true;
                            } else {
                                btn = false;
                            }
                        });
                    })
                    if(btn) this.$refs.save.btn();
                }
            },

            customBackFun(){//自定义方法体
            },
        },
    }
</script>
